home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14432 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: grimsel.zurich.ibm.com!usenet
  2. From: Keith Whittingham <wgk@zurich.ibm.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: How can you make this work?
  5. Date: Sun, 14 Apr 1996 19:07:05 -0700
  6. Organization: IBM Zurich Research Laboratory
  7. Message-ID: <3171AF49.47D@zurich.ibm.com>
  8. References: <4kr886$13t@hermes.oanet.com>
  9. NNTP-Posting-Host: pine.zurich.ibm.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.01 (Win16; I)
  14.  
  15. scorpion@portal.connect.ab.ca wrote:
  16. >         I need to know why this gives an 'Illegal Pointer
  17. > Arithmetic' error ; It's supposed to be a pixel write routine:
  18. > void putpixel(short x,short y,unsigned char colour)
  19. > {       char far *Startofvidmem;
  20. >         char far *Location; /* Address of where to write the
  21. > pixel*/
  22. >         Startofvidmem = 0xA000;
  23. >         Location = Startofvidmem + (y*320) + x;
  24. >         *Location = colour;
  25. > }
  26. >         Thanx in advance!
  27. > John Smith
  28.  
  29. It should work but I would stick a few more zero's in the address
  30. of the video buffer if you're working on a PC...
  31.  
  32. Try 0xA0000000.
  33.  
  34.  
  35. -- 
  36. Keith Whittingham
  37. wgk@zurich.ibm.com
  38.